Skip to content

fix(flake): make opencode's mcpx-src follow this repo - #11987

Merged
dezren39 merged 1 commit into
mainfrom
claude/mcpx-pool-flake
Nov 19, 2026
Merged

dezren39 merged 1 commit into
mainfrom
claude/mcpx-pool-flake

Conversation

@dezren39

@dezren39 dezren39 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Before: the mcpx that the opencode fork bundles (and that amd builds as a dependency of opencode-2.0.30+f852201) was built from mcpx-src, pinned by the fork's own flake.lock to code rev d3a0db8. amd's rebuild of main failed in that mcpx's checkPhase: TestDefaultConfigStdioRunsSupervised reported "supervised child ... still alive after the reap" at supervised_default_test.go:73 after 10.07s. At d3a0db8 the test sends a single terminate scan right after p.Close(); the pool's detach is asynchronous, so under load the supervisor still has the daemon attached and refuses the terminate, nothing kills the child, and the test polls out its fixed 10s. Main already fixed the test (#11828: testsupport.StopSupervisors retries the refusal and returns only once the supervisor socket is gone, which the supervisor removes only after reaping its child), and the root flake's own mcpx built from main passed in the same rebuild. The fix just never reached the opencode-bundled mcpx, because this flake left mcpx-src to the fork's lock.

After: opencode.inputs.mcpx-src follows this flake itself (follows = ""). The opencode-bundled mcpx, its daemon modules, and the packages.<system>.mcpx here are all built from this repo's pkgs/mcpx. With the same fleet nixpkgs (all three fleet nodes lock 082bd9e7), that is one derivation, so a rebuild builds and tests mcpx once, and a fix landed here reaches amd's next rebuild without re-locking the fork.

How: one follows line in flake.nix with a comment, matching the one-source rule the openchamber -> opencode follow already states. In flake.lock, opencode.inputs.mcpx-src becomes [] (the root) and the stale mcpx-src node is removed. I couldn't run nix flake lock against the real graph here (this sandbox can't fetch the openchamber fork), so I made the lock edit by hand. I checked it against what Nix 2.34 writes for the same shape (a child flake with a flake = false input following "", plus a sibling flake following that child): it writes "mcpx-src": [] and nothing else, and evaluation resolves the root's tree. No test code changes; main's test already holds.

Evidence, -run 'TestDefaultConfigStdioRunsSupervised$', GOMAXPROCS=1, 3 copies in parallel next to 12 busy-loop CPU burners on 4 cores:

  • d3a0db8 (the pinned rev): 3 of 30 runs failed with the exact amd error at line 73 (still alive after the reap).
  • main: 150 of 150 runs passed under the same stress, plus 50 of 50 unstressed and 20 of 20 with -race.

Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Chores
    • Updated the bundled OpenCode integration to use the same pinned source as the main project.
    • This is an internal consistency change; no user-facing behavior or available features have changed.

amd's rebuild of main failed in the checkPhase of the mcpx that the
opencode fork bundles (mcpx-0.1.0 under opencode-2.0.30+f852201):
TestDefaultConfigStdioRunsSupervised reported "supervised child ...
still alive after the reap" at supervised_default_test.go:73 after
10.07s. That line and the 10s bound only exist at d3a0db8, the code
rev the fork's own flake.lock pins as mcpx-src: the test there sends
one terminate scan right after p.Close(), but the pool's detach is
asynchronous, so under load the supervisor still has the daemon
attached and refuses; nothing kills the child and the test polls out
its 10s. Main already fixed the test (#11828: StopSupervisors retries
the refusal and returns only once the socket is gone, which the
supervisor removes after reaping its child), and the root mcpx built
from main passed in the same rebuild. The fix never reached the
opencode-bundled mcpx because this flake left mcpx-src to the fork's
lock.

Follow the root flake instead (`follows = ""`): this repo is mcpx's
canonical home, matching the one-source rule the openchamber ->
opencode follow already states. The bundled mcpx is now built from
the same pkgs/mcpx tree and the same fleet nixpkgs as
packages.<system>.mcpx, so it is the same derivation and a rebuild
builds and tests mcpx once.

flake.lock: opencode.inputs.mcpx-src is [] (the root) and the stale
mcpx-src node (d3a0db8) is gone; the shape matches what nix writes
for an equivalent follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The flake configures OpenCode’s mcpx-src input to follow the root flake’s mcpx-src input. Comments describe this source relationship and the prior fork-lock behavior.

Changes: OpenCode mcpx source pin

Layer / File(s) Summary
Configure OpenCode’s mcpx input
flake.nix
Comments describe the mcpx source relationship and prior fork-lock behavior. OpenCode’s mcpx-src input now follows the root flake’s input.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · up to 57b7d

This change makes the bundled mcpx in the opencode input use this repository's mcpx source, so fixes here reach the next rebuild. No concrete defect was identified, and the change is a small and easily reversible flake edit.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says the opencode flake input's mcpx-src now follows this repo's root flake. The raw summary confirms this main change: the opencode input follows the root mcpx-src input, so the bundled mcp…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says the opencode flake input's mcpx-src now follows this repo's root flake. The raw summary confirms this main change: the opencode input follows the root mcpx-src input, so the bundled mcpx uses the root pin. The objectives match this. The title is concise, specific, and uses a conventional commit prefix. It does not mention the lockfile or the test-stability motivation, which is acceptable because it names the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 423e7a93-1306-4b4c-a85e-67fc6dab0cb7
Commits

Reviewing files that changed from the base of the PR and between 7996c3b and 57b7dae.

Files ignored due to path filters: 1

  • flake.lock is excluded by !**/*.lock
Files selected for processing: 1

  • flake.nix

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@dezren39
dezren39 marked this pull request as ready for review November 19, 2026 02:24
@dezren39
dezren39 requested a review from a team as a code owner November 19, 2026 02:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T02:25:49.225335Z 57b7dae Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 8ca6164 into main Nov 19, 2026
1 check passed
@dezren39
dezren39 deleted the claude/mcpx-pool-flake branch November 19, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants